home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vblha1
/
main.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
15KB
|
694 lines
VERSION 2.00
Begin Form frmMain
ClientHeight = 4035
ClientLeft = 375
ClientTop = 1920
ClientWidth = 8625
Height = 4770
Left = 315
LinkTopic = "Form2"
ScaleHeight = 4035
ScaleWidth = 8625
Top = 1245
Width = 8745
Begin PictureBox picStatus
Align = 2 'Align Bottom
BackColor = &H00C0C0C0&
Height = 255
Left = 0
ScaleHeight = 225
ScaleWidth = 8595
TabIndex = 3
Top = 3780
Width = 8625
Begin TextBox txtMemo
BackColor = &H00C0C0C0&
Height = 285
Left = 3840
TabIndex = 9
Top = 0
Width = 1335
End
Begin TextBox txtFname
BackColor = &H00C0C0C0&
Height = 285
Left = 2640
TabIndex = 6
Top = 0
Width = 1215
End
Begin TextBox txtName
BackColor = &H00C0C0C0&
Height = 285
Left = 1200
TabIndex = 5
Top = 0
Width = 1455
End
Begin TextBox txtID
BackColor = &H00C0C0C0&
Height = 285
Left = 120
TabIndex = 4
Top = 0
Width = 1095
End
End
Begin ComboBox cboID
Height = 300
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 120
Width = 1815
End
Begin PictureBox PicControl
Align = 1 'Align Top
BackColor = &H00C0C0C0&
FillColor = &H00FFFFFF&
Height = 495
Left = 0
ScaleHeight = 465
ScaleWidth = 8595
TabIndex = 1
Top = 0
Width = 8625
Begin TextBox txtFrom
Height = 285
Left = 5760
TabIndex = 13
Top = 120
Width = 1215
End
Begin TextBox txtSub
Height = 285
Left = 3600
TabIndex = 11
Top = 120
Width = 1575
End
Begin OptionButton optMemo
BackColor = &H00C0C0C0&
Caption = "&Memo"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 600
TabIndex = 10
Top = 0
Width = 1095
End
Begin OptionButton optName
BackColor = &H00C0C0C0&
Caption = "&Name"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 8
Top = 240
Width = 735
End
Begin OptionButton optID
BackColor = &H00C0C0C0&
Caption = "&ID"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 7
Top = 0
Width = 495
End
Begin Label lblFrom
BackColor = &H00C0C0C0&
Caption = "From:"
Height = 255
Left = 5280
TabIndex = 14
Top = 120
Width = 495
End
Begin Label lblSub
BackColor = &H00C0C0C0&
Caption = "Sub:"
Height = 255
Left = 3240
TabIndex = 12
Top = 120
Width = 375
End
End
Begin TextBox txtWorkarea
BorderStyle = 0 'None
Height = 1815
Left = 0
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Top = 480
Width = 3375
End
Begin Menu mnuFile
Caption = "&File"
Begin Menu mnuNew
Caption = "&New"
End
Begin Menu mnuOpen
Caption = "&Open"
End
Begin Menu mnuSave
Caption = "&Save"
End
Begin Menu mnuClose
Caption = "&Close"
End
Begin Menu mnuSep1
Caption = "-"
End
Begin Menu mnuFDelete
Caption = "&Delete"
End
Begin Menu mnuTrash
Caption = "&Trash"
End
Begin Menu mnuSep2
Caption = "-"
End
Begin Menu mnuExit
Caption = "E&xit"
End
End
Begin Menu mnuEdit
Caption = "&Edit"
Begin Menu mnuCut
Caption = "Cu&t"
End
Begin Menu mnuCopy
Caption = "&Copy"
End
Begin Menu mnuPaste
Caption = "&Paste"
End
Begin Menu mnuDelete
Caption = "&Delete"
End
End
Begin Menu mnuView
Caption = "&View"
End
Begin Menu mnuOptions
Caption = "&Options"
End
End
Option Explicit
Dim TotalRec As Long
Sub cboID_Click ()
'Update status bar
procStatusBar
End Sub
Sub Form_Activate ()
'Update status bar
procStatusBar
'Set file name to default
If workfile.fopen = "" Then
frmMain.Caption = txtFname.Text
End If
End Sub
'Copyright 1995 by Hitoshi Ozawa
Sub Form_Load ()
' Load the frmGetFile dialog box without displaying
Load frmGetFile
'Initialize the cboFileType combo box of the frmGetFile
frmGetFile.cboFileType.AddItem "Text files (*.txt)"
frmGetFile.cboFileType.AddItem "All files (*.*)"
frmGetFile.cboFileType.AddItem "LHA files (*.LZH)"
frmGetFile.cboFileType.ListIndex = 0
'Initialize to ID selection
optID.Value = True
'Initialize ID combo list
procGetID
End Sub
Sub Form_Resize ()
picControl.ScaleWidth = frmMain.ScaleWidth
txtWorkArea.Width = frmMain.ScaleWidth
txtWorkArea.Height = frmMain.ScaleHeight - picControl.ScaleHeight - picStatus.ScaleHeight
End Sub
'Copyright 1995 by Hitoshi Ozawa
Sub mnuClose_Click ()
'Clear text area
txtWorkArea.Text = ""
frmMain.Caption = ""
'Reset filenames
workfile.lopen = ""
workfile.fopen = ""
'Refresh frmGetfile
frmGetFile.txtFileName.Text = ""
frmGetFile.filFiles.Pattern = "*.txt"
frmGetFile.filFiles.Refresh
End Sub
Sub mnuCopy_Click ()
'Clear the clipboard
Clipboard.Clear
'Transfer to the clipboard
Clipboard.SetText txtWorkArea.SelText
End Sub
Sub mnuCut_Click ()
'Clear the clipboard
Clipboard.Clear
'Transfer to the clipboard
Clipboard.SetText txtWorkArea.SelText
'Delete the current selected aread
txtWorkArea.SelText = ""
End Sub
Sub mnuDelete_Click ()
'Delete selected area
txtWorkArea.SelText = ""
End